package com.chen.hotel.dao;

import com.chen.hotel.domain.Room;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface RoomDao extends JpaRepository<Room, Integer> {


    /**
     * 根据typeId分页查询房间数据
     * @param type
     * @param pageable
     * @return
     */
    public Page<Room> findByType(Integer type, Pageable pageable);

    /**
     * 根据楼层查询房间数据
     * @param floor
     * @param pageable
     * @return
     */
    public Page<Room> findByFloor(Integer floor, Pageable pageable);

    /**
     * 查询某种状态的房间数据
     * @param status
     * @param pageable
     * @return
     */
    public Page<Room> findByStatus(Integer status, Pageable pageable);
}
